import React, { lazy, Suspense } from 'react'
import { Redirect, Route, Switch } from 'react-router-dom'
import ROUTES from 'constants/routes'
const Video = lazy(() => import('./Video'))
const Mv = lazy(() => import('./MV'))
const Videos = () => {
  return (
    <Suspense fallback={null}>
      <Switch>
        <Route exact path={ROUTES.VIDEO} component={Video} />
        <Route exact path={ROUTES.VIDEOS} component={Video} />
        <Route exact path={ROUTES.MV} component={Mv} />
        <Redirect from={`${ROUTES.VIDEOS}/*`} to={ROUTES.VIDEO} />
      </Switch>
    </Suspense>
  )
}
export default Videos
